package com.example.demo.dao;


import com.example.demo.model.Userinfo;
import org.apache.ibatis.annotations.*;


@Mapper
public interface UserMapper {
    // 注册功能
    @Insert("insert into userinfo(username,password) values(#{username},#{password})")
    int reg(Userinfo userinfo);

    //登录功能
    @Select("select * from userinfo where username=#{username}")
    Userinfo getUserinfoByName(@Param("username") String username);
}
